package com.ziyueyuwen.xiniao.bean.product;


import com.ziyueyuwen.xiniao.handler.common.ArrayList2StringBaseHandler;
import com.ziyueyuwen.xiniao.valid.group.interfaces.address.AddressSave;
import com.ziyueyuwen.xiniao.valid.group.interfaces.address.AddressUpdate;
import org.apache.ibatis.type.JdbcType;
import tk.mybatis.mapper.annotation.ColumnType;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;
import java.util.List;

/**
 * @author wancheng
 */
public class OrderAddressSaveAO {

    @NotNull(message = "地址id不能为空",groups = {AddressUpdate.class})
    private Integer id;

    @NotEmpty(message = "收件人不能为空",groups = {AddressSave.class,AddressUpdate.class})
    private String consignee;

    @NotEmpty(message = "收件人手机号码不能为空",groups = {AddressSave.class,AddressUpdate.class})
    private String consigneeAccount;

    @NotNull(message = "地区不能为空")
    @Size(min = 1,max = 3,message = "地区长度最小为{min},最大为{max}",groups = {AddressSave.class,AddressUpdate.class})
    private List<String> area;

    @NotEmpty(message = "收货地址不能为空",groups = {AddressSave.class,AddressUpdate.class})
    private String address;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getConsignee() {
        return consignee;
    }

    public void setConsignee(String consignee) {
        this.consignee = consignee == null ? null : consignee.trim();
    }

    public String getConsigneeAccount() {
        return consigneeAccount;
    }

    public void setConsigneeAccount(String consigneeAccount) {
        this.consigneeAccount = consigneeAccount == null ? null : consigneeAccount.trim();
    }

    public List<String> getArea() {
        return area;
    }

    public void setArea(List<String> area) {
        this.area = area;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address == null ? null : address.trim();
    }

}